﻿

<div class="div_rodapé">

    @if (Session["nome_user"] != null)
{ 
        
        <script>

            var time = new Date('', '', '', '@FormsAuthentication.Timeout.Hours', '@FormsAuthentication.Timeout.Minutes', '@FormsAuthentication.Timeout.Seconds', 0);
          var refreshIntervalId =  setInterval(function () { mostra_versao() }, 1000);

          function mostra_versao()
          {111

              
             
               if (time.getMinutes() == 0 && time.getSeconds() == 0)
               {
                   document.getElementById("sessao").innerHTML = '0:00';
                   clearInterval(refreshIntervalId);

               }
               else
               {
                   time.setSeconds(time.getSeconds() - 1);
                   if (parseInt(time.getSeconds().toString()) < 10)
                   {

                       document.getElementById("sessao").innerHTML = time.getMinutes() + ':0' + time.getSeconds();
                   }
                   else
                   {

                       document.getElementById("sessao").innerHTML = time.getMinutes() + ':' + time.getSeconds();
                   }
               }

          }

        </script> 
    
  <div class="userlogado"> @Session["nome_user"].ToString() </div><a href="/Intranet_/Inicio/Logout_sair">
    <div class="bsair" style="width:70px;">Sair</div></a><a href="/Intranet_/Inicio/TrocaSenha"><div style="width:120px;" class="bsair">Trocar senha</div></a>
    <br />
    <br /><div class="sessao"><span>Sessão expira em: </span><span id="sessao"></span></div>


    }
    
  
    
</div>

 